<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        /*** 
         *  7: [push pop shift unshift reverse sort splice]
         * 
         *  shift 
         * 1. 作用：从数组的头部删除
         * 2. 参数：
         * 3. 返回值：被删除的元素
         * 4. 是否改变原数组： 改变
         * 
         */

        let chain = [1,2,3,4,5,6,7,8,9,10];

        // console.log(chain.shift(),chain.shift(),chain);

        while(chain.length){
            console.log(chain.shift(),chain.shift());
        }


    </script>
</body>
</html>